package com.lovo.exception;

public class Computer extends Role{

    public void generate(){
        for(int i = 0;i < 4;i++){
            boolean isRepeat = false;
            int [] numbers = this.getNumbers();
            numbers[i] = generateCode(0,9);
            for(int j = 0;j < i;j++){
                if(numbers[i] == numbers[j]){
//                    isRepeat = true;
                    i--;
                    break;
                }
            }
        }
    }
    public int generateCode(int start,int end){
        return (int)(Math.random() * (end - start + 1) + start);
    }


}
